Learning Objectives

After completing this lesson, you'll be able to:

Resources

Introduction

You might think removing attributes is a less critical task in FME. That's because - for a manual attribute schema - only attributes defined in the writer are written to the output; extra attributes not on the writer schema are dropped.

However, removing attributes has benefits:

Note

You can unexpose attributes on reader feature types under the User Attributes tab. Unexposing attributes tidies your workspace, but it does not improve performance. However, some formats (mostly databases) also have a setting for "Attributes to Read"; using this will help performance.

Transformers that can remove attributes are:

Removing Attributes

The AttributeManager and AttributeRemover have the same technique: select an attribute to be removed:

Using the remove attribute button in AttributeManager

In the AttributeManager, you can remove attributes by selecting them and clicking the - button. Alternatively, you can change the action field from Do Nothing to Remove.

Notice in the above screenshot that three attributes have been removed. The output attribute (when selected) is blank to signify that it is no longer present.

Keeping Attributes

The AttributeKeeper transformer carries out the same function but approaches it from the opposite direction. It lets the user specify which attributes are not to be removed; in other words, this transformer lets the user specify which ones to keep.

So, you should use the AttributeManager when you want to remove one or two attributes but keep the rest. You should use the AttributeKeeper when you want to remove the majority of attributes and retain only one or two.

Bulk Attribute Removal

The BulkAttributeRemover - like the BulkAttributeRenamer - lets the user carry out a process on multiple attributes. In this case, instead of being able to select all attributes, the user enters a string-matching expression to define which attributes to remove:

Using the BulkAttributeRemover

Here, the user removes all attributes whose names end in the word "Count."

Refer to the RegEx Quick Reference below for help constructing regular expressions.

RegEx Quick Reference

Note

You can access AI Assist in any transformer that uses RegEx, SQL, or Python. AI Assist helps you build statements from natural language.

Exercise

Note

Want to check your work from the last exercise? Here are the transformers Jennifer chose:

If you haven't done so already, please drag these transformers into their corresponding bookmark.

Answer to previous exercise

1) Open Workspace

Jennifer opens the starting workspace (C:\FMEData\Workspaces\TransformAttributes\removing-attributes.fmw) in FME Workbench (2025.0.1 or later).

Jennifer chose to use a BulkAttributeRemover and an AttributeRemover in her workspace.

Transformers added to bookmark

2) Configure BulkAttributeRemover 

She double-clicks the BulkAttributeRemover to open its parameters.

She enters PST for the Expression to Remove:

Configuring Expression to Remove

This will remove the four attributes containing the string PST: PSTLADDRESS, PSTLCITY, PSTLPROV, and INTPSTLCD.

She clicks OK.

3) Configure AttributeRemover

She opens the parameters for the AttributeRemover.

She selects OBJECTID as the Attribute to Remove:

Selecting an attribute to remove

She clicks OK.

4) View Results

She uses Run To This on the AttributeRemover:

Run To This

She inspects the AttributeRemover's Output cache. She confirms the five attributes have been removed.